// 首页API
export const HomePageAPI = '/api/Page/Home'
// 首页训练营API
export const HomePageTrainAPI = '/api/Live/TrainingPlan'
// 首页热门标签API
export const HomePageHotLabelAPI = '/api/Page/EditableArea?editableareaname=%E7%83%AD%E9%97%A8%E6%A0%87%E7%AD%BE'
// 标签页book API
export const TagBookAPI = (tag = '11', page = 1, sort = 'new') => `/api/Book?tag=${tag}&page=${page}&sort=${sort}`
// 标签页article API
export const TagArticleAPI = (tag = '772', page = 1, sort = 'new') => `/api/Article?tag=${tag}&page=${page}&sort=${sort}`
// 标签页训练营API 
export const TagTrainAPI = (sort = 'new', page = 1) => `/api/Live/TrainingPlan?sort=${sort}&page=${page}`
// 训练营详情API 
export const TrainAPI = id => `/api/Live/TrainingPlan/${id}`
// 图书页API
export const BookPageAPI = (category, sort = 'new', page = 1, tab = 'ebook') => `/api/Book?category=${category}&sort=${sort}&page=${page}&tab=${tab}`
// 图书页->更多筛选API
export const BookMoreAPI = `/api/Category/All`
// 购物API
export const CartAPI = `/api/Cart`
// 购物->添加到购书袋->请求API
export const CartBuyAPI = (id,edition) => `/api/Cart/Add?id=${id}&edition=${edition}`
// 购物->完成订单 API
export const CheckoutAPI = `/api/Cart/Checkout`
// 我的页面API
export const UserPageAPI = '/api/User/Profile'
// 单书API
export const BookItemAPI = `/api/Book/`
// 发送推荐请求 API
export const BookFavAPI = (isFav,id) => `/api/Book/${isFav}?id=${id}`
// 发送收藏请求 API
export const BookVoteAPI = (isVote,id) => `/api/Book/${isVote}?id=${id}`
// 发送关注用户请求 API
export const FollowUserAPI = (isFollow,id) => `/api/User/${isFollow}?id=${id}`
// 单书ErrAPI
export const BookErrAPI = (id,sort='accepted') => `/api/book/errata?page=1&sort=${sort}&id=${id}`
// 文章API
export const ArticleAPI = id => `/api/Article/${id}`
// 发送推荐请求（文章） API
export const ArticleFavAPI = (isFav,id) => `/api/Article/${isFav}?id=${id}`
// 发送推荐请求（文章） API
export const ArticleVoteAPI = (isVote,id) => `/api/Article/${isVote}?id=${id}`
// 阅读API
export const ReadAPI = id => `/api/Book/Tupub/${id}`
// 搜索API
export const SearchPageAPI = `/api/Page/EditableArea?editableareaname=热门标签`
// 搜索->图书 API
export const SearchBooksAPI = (q,page=1) => `/api/Search/Books?q=${q}&page=${page}`
// 搜索->课程 API
export const SearchCoursesAPI = (q,page=1) => `/api/Search/LiveCourses?q=${q}&page=${page}`
// 搜索->观点 API
export const SearchArticlesAPI = (q,page=1) => `/api/Search/Articles?q=${q}&page=${page}`
// 搜索->用户 API
export const SearchUsersAPI = (q,page=1) => `/api/Search/Users?q=${q}&page=${page}`
// 我的->拥有的书 API
export const OweBookAPI = (type,page=1,query,desc=true) => `/api/User/${type}?page=${page}&query=${query}&desc=${desc}`
// 我的->已购买的课程 API
export const OweCourseAPI = (type,page=1) => `/api/User/${type}?page=${page}`
// 我的->我的订单 API
export const OweOrderAPI = `/api/order`
// 我的->收藏夹 API
export const OweFavAPI = (type,page=1)=> `/api/User/Fav/${type}?page=${page}`
// 我的->我的关注 API
export const FollowAPI = (type,page=1)=> `/api/${type}?page=${page}`
// 我的->我的提醒 API
export const NotificationAPI = (page=1)=> `/api/User/Notification?page=${page}`
// 我的->个人空间 API
export const SpaceAPI = (id) => `/api/Space/PublicInfo?id=${id}`
// 发信息
export const CorrespondAPI = (msg,receiverUserId) => `/api/message/send?body=${msg}&receiverUserId=${receiverUserId}`
// 我的->信息页
export const MsgAPI = (page)=> `/api/Message/Conversation?page=${page}`
// 信息页->对话详情
export const DialogueAPI = (id,page)=> `/api/message/chat?id=${id}&page=${page}`
// 随书下载 -> API
export const DownloadAPI = guid => `/api/EmailBookResource/${guid}`








